package com.dai.wechat.pojo;

import com.thoughtworks.xstream.annotations.XStreamAlias;

import java.util.Map;

//该注解就可以将对象转换为一个xml的数据
@XStreamAlias("xml")
public class BaseMessage {
    // 开发者微信号
    private String ToUserName;
    // 发送方帐号（一个OpenID）
    private String FromUserName;
    // 消息创建时间 （整型）
    private String CreateTime;
    // 消息类型（text/image/location/link）
    private String MsgType;
 
    public BaseMessage(Map<String, String> requestMap){
        this.ToUserName = requestMap.get("FromUserName");
        this.FromUserName = requestMap.get("ToUserName");
        this.CreateTime = System.currentTimeMillis()/1000+"";
    }
    public String getToUserName() {
        return ToUserName;
    }
 
    public void setToUserName(String toUserName) {
        ToUserName = toUserName;
    }
 
    public String getFromUserName() {
        return FromUserName;
    }
 
    public void setFromUserName(String fromUserName) {
        FromUserName = fromUserName;
    }
 
    public String getCreateTime() {
        return CreateTime;
    }
 
    public void setCreateTime(String createTime) {
        CreateTime = createTime;
    }
 
    public String getMsgType() {
        return MsgType;
    }
 
    public void setMsgType(String msgType) {
        MsgType = msgType;
    }
    
}